<template>
  <div id="fu">
    <div id="desc">
      <i class="el-icon-zoom-in"></i>
      <span>授课查询</span>
    </div>

    <div class="contine">
      <!-- 表格内容 -->
      <el-row>
        <el-col :span="24">
          <el-table
            :data="tableData"
            stripe
            style="width: 100%">
            <el-table-column
              prop="courseId"
              label="课程Id"
              width="180">
            </el-table-column>
            <el-table-column
              prop="courseName"
              label="课程名"
              width="180">
            </el-table-column>
            <el-table-column
              prop="courseGrade"
              label="年级">
            </el-table-column>
            <el-table-column
              prop="courseCredit"
              label="学分">
            </el-table-column>
            <el-table-column
              prop="courseTime"
              label="上课时间">
            </el-table-column>
            <el-table-column
              prop="courseLocation"
              label="上课地点">
            </el-table-column>
            <el-table-column
              prop="courseSelectedCount"
              label="选课人数">
            </el-table-column>
          </el-table>
        </el-col>
      </el-row>
    </div>

  </div>
</template>

<script>
import {get} from "../../common/request";

export default {
  name: "TeacherCourse",
  data() {
    return {
      tableData: []
    }
  },
  methods: {
    getData() {
      get("/course/getTeacherCourse").then(x => {
        this.tableData = x.data;
      })
    }
  },
  mounted() {
    this.getData();
  }
}
</script>

<style scoped>
#fu {
  padding: 0 15px;
  background-color: rgb(240, 240, 240);
}

#desc {
  font-size: 14px;
  padding: 15px 0;
}

.contine {
  background-color: white;
  border-radius: 3px;
  border: 1px solid lightgray;
  padding: 10px 30px;
}
</style>
